<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Persist Korisnika</title>
</head>
<body>
<h1>Persist korisnika</h1>
<c:if test="${userForm.datum == null}">
	<form:form modelAttribute="userForm" action="print/persist.action">
		<form:input path="idUser" />
		<font color="red"><form:errors path="idUser" /></font>
		<form:input path="ime" />
		<form:input path="prezime" />
		<form:input path="datum" />
		<font color="red"><form:errors path="datum" /></font>
		
	</form:form>
</c:if>
<c:if test="${userForm.datum!= null}">
	<form:form modelAttribute="userForm" action="print/submit.action">
		<h1>It's OK</h1>
		<b> ${userForm.ime} </b>
		<b> ${userForm.prezime} </b>
		<b> ${userForm.idUser} </b>
		<font color="red"><form:errors path="idUser" /></font>
		<b> ${userForm.datum} </b>
		<font color="red"><form:errors path="datum" /></font>
	</form:form>
</c:if>

</body>

</html>